home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 302 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.3 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: "john (j.d.) hickin" <hickin@bnr.ca>
  3. Newsgroups: comp.std.c++
  4. Subject: basic_string& operator=(const basic_string&)
  5. Date: 06 Feb 1996 10:28:03 PST
  6. Organization: Bell-Northern Research
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4f81p2$j2u@bmtlh10.bnr.ca>
  9. NNTP-Posting-Host: isolde.mti.sgi.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Original-Date:  Tue, 6 Feb 1996 17:05:38 +0000 
  14. Content-Identifier:  basic_string&... 
  15. X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715) 
  16. X-Url: news:comp.lang.c 
  17. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  18.     iQBVAwUBMRed3Ey4NqrwXLNJAQF5dgIAw6buPq6Z214O2R/OjqDiQJdqBqeWTyJO
  19.     t2qtWQd5tGGhKurr1MZgKcR8aDCwuVcmdUta6Zi4MA5uaqhZAw2/Cw==
  20.     =bxEY
  21. Originator: austern@isolde.mti.sgi.com
  22.  
  23. The following was taken from a copy of the DWP:
  24.  
  25.   basic_string<charT,traits,Allocator>&
  26.       operator=(const basic_string<charT,traits,Allocator>& str);
  27.  
  28.   Effects:
  29.     If *this and str are not the same object, modifies *this such that:
  30.  
  31.                       Table 7--operator=(str) effects
  32.  
  33.              +-------------------------------------------------+
  34.              | Element                    Value                |
  35.              +-------------------------------------------------+
  36.              |data()       points at the first element  of  an |
  37.              |             allocated  copy  of  the  the array |
  38.              |             whose first element is  pointed  at |
  39.              |             by str.size()                       |
  40.              |size()       str.size()                          |
  41.              |capacity()   a value at least as large as size() |
  42.              +-------------------------------------------------+
  43.     If *this and str are the same object, the member has no effect.
  44.   Returns:
  45.     *this
  46.  
  47. Aside from a seeming typographical error in the Value column for Element data()
  48. (... by str.data() ?) the wording of this seems to rule out a counted pointer
  49. representation.
  50.  
  51. Is my interpretation correct?
  52.  
  53. -- 
  54. John Hickin      Bell-Northern Research, Montreal, Quebec
  55. (514) 765-7924   hickin@bnr.ca
  56. ---
  57. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  58.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  59.   in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  60.